﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Web/BizWeb.Master" AutoEventWireup="true" CodeBehind="UploadFile.aspx.cs" Inherits="FrameWork.web.Web.Project.SelPage.UploadFile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="/js/uploadify/uploadify.css" rel="stylesheet" type="text/css" />
     <script src="/js/uploadify/jquery-1.4.2.min.js" type="text/javascript"></script>
     <script src="/js/uploadify/jquery.uploadify.v2.1.4.js" type="text/javascript">
     </script>
    <script src="/js/uploadify/swfobject.js" type="text/javascript"></script>
    <script type="text/javascript" src="/Js/jquery.xml2json.pack.js"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
    function GetRet(filedate) {
        var retval = filedate;        
        //变量：top.coverDivReturnValue是定义在DivCoverWindow.js上的top的传递变量.
        top.coverDivReturnValue = retval;
        //变量：top.callBackHandler是定义在DivCoverWindow.js上的top的传递变量
        if (top.callBackHandler) { var tmp = top.callBackHandler(); }
    }
   
    </script>
 <div style="height:60px;"> <input type="file" name="uploadify" id="uploadify" />
        
        <div><a href="javascript:$('#uploadify').uploadifyUpload()">上传</a></div>
      <%-- <a href="javascript:$('#uploadify').uploadifyClearQueue();"> 取消上传</a> --%>
       <div id="fileQueue" style="display:static;"></div> 
     </div>
     <div style="overflow:auto;">
        <table id="tblfiles" class="inputtbl" style="width:80%;">
            <tr><th width="70%" align="left">文件</th><th align="left">大小</th></tr>          
        </table>
     </div>
  <script type="text/javascript">
      $(document).ready(function () {
          $("#uploadify").uploadify({
              'uploader': '/js/uploadify/uploadify.swf', //进度条，Uploadify里面含有 
              'method': 'GET',
              'script': '/web/ServiceHandler/jqueryUploadifyHandler.ashx', //一般处理程序 
              'scriptData': { 'prjid': '<%=Request.QueryString["prjid"] %>', 'orderid': '<%=Request.QueryString["orderid"] %>', 'fileclass': '<%=Request.QueryString["fileclass"] %>' },
              'cancelImg': '/js/uploadify/cancel.png', //取消图片路径 
              'folder': '/uploadFile', //上传文件夹名 
              'queueID': 'fileQueue',
              'auto': false,
              'onComplete': function (event, queueID, fileObj, response, data) {
                  
                  //.close(); //window.opener.unlockui(value);
                  var finfo = $.xml2json(response);

                  var name = finfo.path.match(/[^\/]+$/)[0];
                  var td1 = $("#tblfiles").append("<tr><td>" + name + "</td><td>" + finfo.size + "</td></tr>");

              },
              'multi': false,
              'sizeLimit': 10737418240
              //,fileDesc:"请选择jpg rar文件"
              //,fileExt: "*.rar;*.jpg;*.xsl;*.xslx"
          });
      });  
     </script> 


</asp:Content>
